/**
 * 
 */
package cn.fiker.BeautyPic.Activities;

import cn.fiker.BeautyPic.Consts;
import cn.fiker.BeautyPic.worker.TaskRunningCheck;
import cn.fiker.BeautyPic.R;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.view.Menu;
import com.umeng.analytics.MobclickAgent;
/**
 * @author liuqs
 * 
 */
public class init extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		MobclickAgent.onError(this);
		
		setContentView(R.layout.activity_init);

		SharedPreferences system_info = this.getSharedPreferences("USER_INFO", Context.MODE_PRIVATE);

		system_info.getBoolean("isFirstLogin", true);

		Editor edit = system_info.edit();
		edit.putString("User_Imei", Consts.IMEI);
		
		edit.commit();
		
		TaskRunningCheck tc	= new TaskRunningCheck(this);
		tc.checkRunningProcess();
		
	}
	
    @Override
	protected void onPause() {
    	MobclickAgent.onPause(this);
		super.onPause();
	}

	@Override
	protected void onResume() {
		MobclickAgent.onResume(this);
		super.onResume();
	}

	@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}
